package com.huatek.framework.show;

import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/ajaxController.do")
public class AjaxExampleController {
	@RequestMapping(params = "actionMethod=init",method = RequestMethod.GET)
	public String add(Model model){
		return "page.ajax_test";
	}
	@RequestMapping(params = "actionMethod=getData")
	public String getData(Model model,@RequestParam("id")Long contentId,HttpServletRequest request){
		model.addAttribute("success", new Date());
		return "ajax_updateCheckingDate";
	}
}
